package com.yigo.prc.infra.repo.converter;

import com.yigo.framework.snapshot.SnapshotConverter;
import com.yigo.prc.api.category.resp.CategoryTreeResp;
import com.yigo.prc.domain.category.entity.PrcCategory;
import com.yigo.prc.infra.repo.dataobject.PrcCategoryPO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.*;

/**
 * @author chenzl
 */
@Mapper
public interface PrcCategoryDmo2PoConverter extends SnapshotConverter {
    PrcCategoryDmo2PoConverter INSTANCE = Mappers.getMapper(PrcCategoryDmo2PoConverter.class);

    PrcCategoryPO toPO(PrcCategory dmo);

    List<CategoryTreeResp> toTreeRespList(List<PrcCategoryPO> poList);
}
